package com.xlh.param.course;

import com.xlh.util.InputValidator;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

/**
 * 创建或修改技能参数
 * <p>
 * Created by lx on 2019/2/26.
 */
@Data
public class TechnologyParam {

    @ApiModelProperty(value = "技能名称")
    @NotBlank(message = "技能名称不能为空")
    @Length(max = 15, message = "技能名称不能超过15个字符")
    private String name;

    @ApiModelProperty(value = "简介")
    @Length(max = 200, message = "简介不能超过200个字符")
    private String introduction;

    public String getName() {
        return name == null ? null : InputValidator.regSpecialChar(name);
    }

}
